module.exports = app => {
    const mongoose = app.mongoose;
    const Schema = mongoose.Schema;
    const codeSchema = new Schema({
        token: String,
        code: String,
        createdAt: {
            type: Date,
            default:Date.now,
            expires: 300,
        }
    })
    return mongoose.model('Code', codeSchema)
}
